package com.example.dyxeapplication.menu.ejaan;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.dyxeapplication.R;
import com.example.dyxeapplication.content.menu.ejaan.belajar.Ejaan_GJY;
import com.example.dyxeapplication.content.menu.ejaan.belajar.kata.Kata_GJY;
import com.example.dyxeapplication.content.menu.ejaan.belajar.kata.perhuruf.Kata_G;
import com.example.dyxeapplication.menu.Menu;

public class Menu_Ejaan_GJY extends Activity {
	private Button imgview1, imgview2, imgview3;

	@Override
	public void onCreate(Bundle icicle) {
		super.onCreate(icicle);
		setContentView(R.layout.menu_ejaan_3);

		Button satu = (Button) findViewById(R.id.satu);
		Button dua = (Button) findViewById(R.id.dua);
		Button tiga = (Button) findViewById(R.id.tiga);
		
		imgview1 = (Button) findViewById(R.id.a);
		imgview1.setBackgroundResource(R.drawable.g);

		imgview2 = (Button) findViewById(R.id.e);
		imgview2.setBackgroundResource(R.drawable.j);

		imgview3 = (Button) findViewById(R.id.g);
		imgview3.setBackgroundResource(R.drawable.y);
		
		satu.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent i = new Intent(Menu_Ejaan_GJY.this, Ejaan_GJY.class);
				i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
				startActivity(i);
			}
		});
		
		dua.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent i = new Intent(Menu_Ejaan_GJY.this, Kata_GJY.class);
				i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
				startActivity(i);
			}
		});
		
		tiga.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent i = new Intent(Menu_Ejaan_GJY.this, Kata_G.class);
				i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
				startActivity(i);
			}
		});
	}

	@Override
	public void onBackPressed() {
		Intent myIntent = new Intent(this, Menu_Ejaan_Belajar.class);
		myIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		startActivity(myIntent);
	}
	
	public void home(View v){
		Intent myIntent = new Intent(this, Menu.class);
		myIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		startActivity(myIntent);
	}

}
